home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / TAPEBAK.422 < prev    next >
Text File  |  1993-03-13  |  4KB  |  95 lines

  1. Tape Backup system as a transfer section
  2. Madman #2 @15402
  3. Wed Mar 10 10:54:31 1993
  4. Have a tape backup, and wish you could use a tape for a transfer section in
  5. WWIV?  Yea, I've seen the fancy elaborate mods that are out there, but gimme
  6. a break...  This is the first time I have ever written a MOD of my own.  I
  7. wanted something REAL simple and basic.  So after asking around and still not
  8. finding what I wanted I made my own.
  9.  
  10. To use this you have to create a transfer section called TAPE RESTORED FILES
  11. and put one file in it called RESTORED.ZIP.
  12.  
  13. Adjust the path in the batch file to match whatever you called the directory
  14. when you created it.  I used a 0 byte file as the number it shows is not going
  15. to be correct anyway.  When the user tries to D/L a file that is off line,
  16. this can restore it, copy it to the 'restored directory' for them to download
  17. then delete the original again conserving disk space.  There is never more
  18. than one file in the restored directory and everything off on the transfer's
  19. tape is available for download without you being bothered to have to restore
  20. it.
  21.  
  22. The normal disclaimers all apply here.  I can only tell you that this is
  23. working just fine on my system and nothing catastrophic has occurred.  The
  24. batch file is written for a Colorodo Memory Systems Jumbo tape backup.  If
  25. you have something else, adjust the command line.
  26.  
  27. NOTE: This MOD will 2NOT0 work under Windows as Colorado Memory systems has
  28. not designed it's software to work in a background window.
  29.  
  30. NOTE:  Thanks to Incognito! (1@15418) for his assistance in developing this.
  31.  
  32. NOTE: BACKUP YOUR SOURCE!  DO IT BEFORE YOU EVEN LOOK AT THIS MOD!  I AM NOT
  33. RESPONSIBLE FOR ANYTHING!
  34.  
  35.  
  36. Tested with: 4.22
  37. Difficulty : Can you walk and chew gum?
  38.  
  39. LEGEND:    == existing    ++ add    =+ modify
  40.  
  41. In XFER.C search for printfileinfo around line 980.  Search down about 10
  42. lines and add this code
  43.  
  44. == sprintf(s,"%s%s",directories[dn].path,u->filename);
  45. == if (!exist(s)) {
  46. ==  nl();
  47. ==     pl(get_string(754));          /* FILE NOT THERE in 4.21a */
  48. ==     nl();
  49. ++       printfile("RESTORE.MSG");
  50. ++       pl("Would you like to restore this file? (y,N):");
  51. ++         if(yn())
  52. ++        sprintf(s,"%s %s%s","RESTORE! ",directories[dn].path,stripfn(u->filename));
  53. ++        shrink_out(s,2,1,1,1);
  54. ==    return(-1);
  55. ==   }
  56.  
  57. That's it.  Simply get the path & filename and call a batch file...  so go
  58. recompile.
  59.  
  60. ____________RESTORE!.BAT FILE  (goes in main BBS direstory)__________________
  61.  
  62. @echo off
  63. break off
  64. @rem ------------
  65. @rem ------------        Adjust the COM port in the next line.
  66. @rem ------------
  67. Echo 2Please wait.  Restoring %1 for transfer!0 >com2
  68. @rem ------------
  69. @rem ------------        This line works for a SINGLE volume CMS Jumbo tape
  70. @rem ------------
  71. tape restore %1
  72. @rem ------------
  73. @rem ------------        Adjust the PATH in the next line!!!
  74. @rem ------------
  75. copy %1 d:\dloads\t-bu\restored.zip >nul
  76. del %1 >nul
  77. @rem ------------
  78. @rem ------------        Adjust the COM port in the next 2 lines.
  79. @rem ------------
  80. Echo 2File restored! Please go to the Tape Restored directory0 >com2
  81. Echo 2and download the file as RESTORED.ZIP0 >com2
  82. :EXIT
  83.  
  84. ____________RESTORE.MSG FILE  (goes in GFILES directory)____________________
  85.  
  86. This file is off of the hard drive on tape.  You can restore this file if you
  87. would like to have a copy.  Here's how it works.  If you answer "Yes" to this
  88. prompt, the board will restore the file to the drive and copy it into the
  89. TAPE RESTORED FILES directory as RESTORED.ZIP.. Then you download
  90. RESTORED.ZIP using any protocol you desire.
  91.  
  92. Remember, if you've downloaded an ARJ file, it's still ARJ...  I just had to
  93. copy to a filename so I went with ZIP.  Maybe this can be corrected in the
  94. next version of this mod. <not!>
  95.